Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: import translations from openedx-translations #45

Closed
wants to merge 1 commit into from

Conversation

Ian2012
Copy link
Contributor

@Ian2012 Ian2012 commented Nov 21, 2023

Description

We are manually importing translation files from openedx-translations while openedx-atlas is in place.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 21, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @Ian2012! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@Ian2012
Copy link
Contributor Author

Ian2012 commented Nov 21, 2023

@OmarIthawi how can I compile the .mo files?

Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Ian2012!

@OmarIthawi
Copy link
Member

@OmarIthawi how can I compile the .mo files?

@Ian2012 run i18n_tools generate --verbose or python manage.py compilemessages

@Ian2012
Copy link
Contributor Author

Ian2012 commented Nov 21, 2023

@OmarIthawi ready, but translations will not work till the translate template tag is used correctly. This PR depends on: #41

I will wait till that PR is merged and the translation file updated to do this contribution

@OmarIthawi
Copy link
Member

@Ian2012 how about python manage.py compilemessages, does that work?

i18n_tools generate calls compilemessages under the hood, so we probably don't need i18n_tool generate

you could also compile via msgcat which is the low-level tool of compilemessage.

Regardless of the method, this pull request needs .mo files, otherwise it won't work.

@Ian2012
Copy link
Contributor Author

Ian2012 commented Nov 21, 2023

@OmarIthawi The .mo are in the PR but the translations are not working correctly as the templates are not using the translate template tag

Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OmarIthawi The .mo are in the PR but the translations are not working correctly as the templates are not using the translate template tag

You're right! I'm sorry I missed that! It looks great now. Please reset the tests because codecov has failed.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (82a4299) 92.41% compared to head (b10be52) 92.41%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #45   +/-   ##
=======================================
  Coverage   92.41%   92.41%           
=======================================
  Files           5        5           
  Lines         224      224           
=======================================
  Hits          207      207           
  Misses         17       17           
Flag Coverage Δ
unittests 92.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Ian2012 Ian2012 force-pushed the cag/translations-files branch 2 times, most recently from d381207 to 6a9a9f3 Compare November 22, 2023 15:36
@Ian2012
Copy link
Contributor Author

Ian2012 commented Nov 22, 2023

@OmarIthawi tests are successful now

Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One required change and it should be ready to go. Thanks @Ian2012

Please let me know when it's ready for review again.

feedback/locale Outdated
@@ -0,0 +1 @@
feedback/locale
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this link is needed. Please remove it.

We need the following link though:

cd feedback && ln -sd conf/locale translations

Similar to this one: https://github.com/openedx/xblock-drag-and-drop-v2/blob/master/drag_and_drop_v2/translations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OmarIthawi I've created the new simlink, rebase with master changes and updated the translations files, however, translations are still not working.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The symlink path needs to be updated. please run the following commands to create the right symlink:

cd FeedbackXBlock  # repo root
cd feedback  # package root
rm conf/locale/locale
ln -sd conf/locale translations

This is the only way translations can work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've ran the commands, and pushed the changes, still not working

Copy link
Member

@OmarIthawi OmarIthawi Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the link in the commits. please try again.

Try squashing all the changes and push force.

I see the add6ce5 commit adds the link, but it doesn't appear of the Files tab of the PR https://github.com/openedx/FeedbackXBlock/pull/45/files

Something is wrong in the git commit history

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've squashed the commits and still not working. The translations simlink exists in the repository: https://github.com/openedx/FeedbackXBlock/blob/master/feedback/translations

@Ian2012 Ian2012 force-pushed the cag/translations-files branch 3 times, most recently from add6ce5 to cffac36 Compare November 30, 2023 15:49
@mphilbrick211
Copy link

Hi @feanil - just checking to see if this can be merged?

@feanil feanil requested a review from OmarIthawi March 21, 2024 04:27
@feanil
Copy link
Contributor

feanil commented Mar 21, 2024

Tagging @OmarIthawi and asking him to re-review since he was looking at this and is more familiar with the translations work.

@OmarIthawi
Copy link
Member

@Ian2012 I'm sorry to let you know that we'll have to close this pull request.

As of Redwood, we no longer commit .po files into repositories. This pull request is still not working so, please consider hosting the translations in your own fork.

Please consider checking OEP-58 for more information about the new translation workflow.

cc: @mphilbrick211 @feanil

@Ian2012 Ian2012 closed this Mar 21, 2024
@openedx-webhooks
Copy link

@Ian2012 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants